/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.opensource.jdom.taggen.html.tag;

import org.opensource.jdom.taggen.html.CommonAttributes;

/**
 *
 * Defines an option of a select form field.
 *
 * <h2>Example</h2> <pre><code class="html">
 *&lt;select name="dogs"&gt;
 *	<strong>&lt;option&gt;Domestic Dog&lt;/option&gt;</strong>
 *	<strong>&lt;option&gt;Arctic Fox&lt;/option&gt;</strong>
 *	<strong>&lt;option&gt;Maned Wolf&lt;/option&gt;</strong>
 *	<strong>&lt;option&gt;Grey Wolf&lt;/option&gt;</strong>
 *	<strong>&lt;option&gt;Red Fox&lt;/option&gt;</strong>
 *	<strong>&lt;option&gt;Fennec&lt;/option&gt;</strong>
 *&lt;/select&gt;
 *</code></pre>
 *
 * @see Select
 * @see Optgroup
 * @author sergio.valdez
 */
public class Option extends CommonAttributes{

    /**
     * can be used to specify that the option is initially selected.
     * It must be used in the format selected="selected".
     */
    private boolean selected;
    /**
     * can be used to specify a value for the option. If value is not used,
     * the value of the option element is set to its contents by default.
     */
    private String cssValue;

    /**
     * can be used to specify that the option is initially selected.
     * It must be used in the format selected="selected".
     * @return the selected
     */
    public boolean isSelected() {
        return selected;
    }

    /**
     * can be used to specify that the option is initially selected.
     * It must be used in the format selected="selected".
     * @param selected the selected to set
     */
    public void setSelected(boolean selected) {
        this.selected = selected;
    }

    /**
     * can be used to specify a value for the option. If value is not used,
     * the value of the option element is set to its contents by default.
     * @return the cssValue
     */
    public String getCssValue() {
        return cssValue;
    }

    /**
     * can be used to specify a value for the option. If value is not used,
     * the value of the option element is set to its contents by default.
     * @param cssValue the cssValue to set
     */
    public void setCssValue(String cssValue) {
        this.cssValue = cssValue;
    }

}
